Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow concurrent CF iteration and drop #6005

Closed
wants to merge 4 commits into from

Conversation

javeme
Copy link
Contributor

@javeme javeme commented Nov 2, 2019

Closing ColumnFamilyHandle with unreleased iterators is easy to cause coredump,
because the iterator release is controlled by java GC when using JNI.

This patch fixed it, we let an iterator hold a ColumnFamilyData reference to
prevent the CF from being released too early.

fixed #5982

Closing ColumnFamilyHandle with unreleased iterators is easy to cause coredump,
because the iterator release is controlled by java GC when using JNI.

This patch fixed it, we let an iterator hold a ColumnFamilyData reference to
prevent the CF from being released too early.

fixed facebook#5982
@javeme javeme changed the title Allow iterators to be released after CF close Allow concurrent CF iteration and drop Nov 11, 2019
@javeme
Copy link
Contributor Author

javeme commented Dec 12, 2019

There were 2 failures with a080d46:

1) readYourOwnWrites(org.rocksdb.WriteBatchWithIndexTest)
java.lang.NullPointerException
	at org.rocksdb.RocksIterator.<init>(RocksIterator.java:34)
	at org.rocksdb.WriteBatchWithIndex.newIteratorWithBase(WriteBatchWithIndex.java:132)
	at org.rocksdb.WriteBatchWithIndex.newIteratorWithBase(WriteBatchWithIndex.java:151)
	at org.rocksdb.WriteBatchWithIndexTest.readYourOwnWrites(WriteBatchWithIndexTest.java:49)

@javeme
Copy link
Contributor Author

javeme commented Dec 12, 2019

There were 2 failures with a080d46:

1) readYourOwnWrites(org.rocksdb.WriteBatchWithIndexTest)
java.lang.NullPointerException
	at org.rocksdb.RocksIterator.<init>(RocksIterator.java:34)
	at org.rocksdb.WriteBatchWithIndex.newIteratorWithBase(WriteBatchWithIndex.java:132)
	at org.rocksdb.WriteBatchWithIndex.newIteratorWithBase(WriteBatchWithIndex.java:151)
	at org.rocksdb.WriteBatchWithIndexTest.readYourOwnWrites(WriteBatchWithIndexTest.java:49)

Fixed by e9a32ff#diff-619032444f1ebb2b51e748d8219d7f6eR34

@javeme
Copy link
Contributor Author

javeme commented Dec 12, 2019

Closed since will be fixed by #6147

Note: this patch is based on v6.4

@javeme javeme closed this Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

crash caused by concurrent CF iterations and drops
2 participants